// Summary 必须和类型一起引入作用域
use traits::{notify, notify2, Summary, Tweet, Weibo};

fn main() {
    let tweet = Tweet {
        username: String::from("babyegg"),
        content: String::from("heiheihei"),
        reply: false,
        retweet: false,
    };

    println!("new tweet :{}", tweet.summarize());

    let weibo = Weibo {
        username: String::from("babyegg"),
        content: String::from("heiheihei"),
        reply: false,
        retweet: false,
    };

    // 默认实现
    println!("new tweet :{}", weibo.summarize());

    notify(&tweet);
    notify2(&tweet);
}
